package com.yang.simple_rpc.common.protocol;

/**
 * 响应状态码的枚举类，不能从外部新构造，只能有内部构造器
 * @author : morikawaaaa
 * @date : 2022
 */
public enum SimpleStatus {

    SUCCESS(200, "SUCCESS"),

    ERROR(500, "ERROR"),

    NOT_FOUND(404, "NOT FOUND");

    private int code;

    private String message;

    SimpleStatus(int code, String message){
        this.code = code;
        this.message = message;
    }
    public int getCode() {
        return code;
    }

    public String getMessage() {
        return message;
    }
}
